package com.lingyu.jsjx.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.common.datascope.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lingyu.jsjx.mapper.ParttimeRecordMapper;
import com.lingyu.jsjx.domain.ParttimeRecord;
import com.lingyu.jsjx.service.IParttimeRecordService;

/**
 * 兼职任职档案Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-08
 */
@Service
public class ParttimeRecordServiceImpl  extends ServiceImpl<ParttimeRecordMapper, ParttimeRecord> implements IParttimeRecordService
{
    @Autowired
    private ParttimeRecordMapper parttimeRecordMapper;

    /**
     * 查询兼职任职档案
     * 
     * @param parttimeId 兼职任职档案主键
     * @return 兼职任职档案
     */
    @Override
    public ParttimeRecord selectParttimeRecordByParttimeId(Long parttimeId)
    {
        return parttimeRecordMapper.selectParttimeRecordByParttimeId(parttimeId);
    }

    /**
     * 查询兼职任职档案列表
     * 
     * @param parttimeRecord 兼职任职档案
     * @return 兼职任职档案
     */
    @Override
    @DataScope(deptAlias = "u", userAlias = "pr",type = "jsjx")
    public List<ParttimeRecord> selectParttimeRecordList(ParttimeRecord parttimeRecord)
    {
        return parttimeRecordMapper.selectParttimeRecordList(parttimeRecord);
    }

    /**
     * 新增兼职任职档案
     * 
     * @param parttimeRecord 兼职任职档案
     * @return 结果
     */
    @Override
    public int insertParttimeRecord(ParttimeRecord parttimeRecord)
    {
        return baseMapper.insert(parttimeRecord);
    }

    /**
     * 修改兼职任职档案
     * 
     * @param parttimeRecord 兼职任职档案
     * @return 结果
     */
    @Override
    public int updateParttimeRecord(ParttimeRecord parttimeRecord)
    {

        return baseMapper.updateById(parttimeRecord);
    }

    /**
     * 批量删除兼职任职档案
     * 
     * @param parttimeIds 需要删除的兼职任职档案主键
     * @return 结果
     */
    @Override
    public int deleteParttimeRecordByParttimeIds(Long[] parttimeIds)
    {
        return parttimeRecordMapper.deleteParttimeRecordByParttimeIds(parttimeIds);
    }

    /**
     * 删除兼职任职档案信息
     * 
     * @param parttimeId 兼职任职档案主键
     * @return 结果
     */
    @Override
    public int deleteParttimeRecordByParttimeId(Long parttimeId)
    {
        return baseMapper.deleteById(parttimeId);
    }
}
